<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>短驾自租</title>
    <link rel="stylesheet" href="../css/bootstrap.min.css">
    <link rel="stylesheet" href="../layui/css/layui.css"  media="all">
    <link rel="stylesheet" href="../css/shortrent.shortrent.css">
    <script type="application/javascript" src="../js/jquery-3.3.1.js"></script>
    <script type="application/javascript" src="../js/bootstrap.min.js"></script>
    <script type="application/javascript" src="../layui/layui.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
</head>
<body>

<div id="app">
    <div data-v-67ef3a4a class="csdheader">
        <div data-v-67ef3a4a class="layout clear">
            <div data-v-67ef3a4a class="left csdnav" id="daohang">
                <label data-v-67ef3a4a v-if="weidenglu">
                    <a data-v-67ef3a4a href="../pagehome/login.html" class="colorRed" >登录</a>
                    <a data-v-67ef3a4a href="" class="colorRed">/</a>
                    <a data-v-67ef3a4a href="../pagehome/register.html" class="colorRed" style="margin-right: 10px;">注册</a>
                </label>

                <label data-v-67ef3a4a v-if="denglu">
                    <a data-v-67ef3a4a href="#">你好，</a>
                    <a data-v-67ef3a4a href="#" class="colorRed">/</a>
                    <a data-v-67ef3a4a href="../pagehome/index.html" class="colorRed" style="margin-right: 10px;">[退出]</a>
                </label>


                <a data-v-67ef3a4a="" href="#mobileZuChe">手机租车</a>
                <a data-v-67ef3a4a="" href="helpCenter.html">帮助中心</a>
            </div>
            <div data-v-67ef3a4a="" class="right phone">
                <div data-v-67ef3a4a="" class="typeTab">
                    <a data-v-67ef3a4a="" href="../pagehome/index.html" style="color: rgb(199, 0, 11);">中文</a>&nbsp;/&nbsp;
                    <a data-v-67ef3a4a="" href="../pagehome/index.html">English</a>
                </div>
                <div data-v-67ef3a4a="" class="menu">
                    <a data-v-67ef3a4a="" href="../mymain/mymain.html">我的车速递</a>
                </div>
                <div data-v-67ef3a4a="">
                    <i class="layui-icon layui-icon-cellphone" style="font-size:14px;  color:#c6000f;"></i>
                    <span data-v-67ef3a4a="">400-919-8000</span>
                </div>
            </div>

        </div>
    </div>


    <div data-v-39f7f629 class="csdnav">
        <div data-v-39f7f629="" class="layout clear">
            <div data-v-39f7f629="" class="left logo">
                <a data-v-39f7f629="" href="../pagehome/index.html">
                    <img data-v-39f7f629="" src="">
                </a>
                <div data-v-39f7f629="" class="left navCom">
                    <ul data-v-39f7f629="">
                        <li data-v-39f7f629="" >

                            <a data-v-39f7f629="" href="https://www.chesudi.com/module/activity.html" target="_self" >优惠活动</a>
                        </li>

                        <li data-v-39f7f629="">
                            <a data-v-39f7f629="" href="https://www.chesudi.com/module/joinWork.html" target="_blank" class="">加盟合作</a>
                        </li>
                        <li data-v-39f7f629="">
                            <a data-v-39f7f629="" href="https://www.chesudi.com/module/netCar.html" target="_blank" class="">网约车</a>
                        </li>
                        <li data-v-39f7f629="">
                            <a data-v-39f7f629="" href="https://www.chesudi.com/module/longRent.html" target="_blank" class="">企业长租</a>
                        </li>
                        <li data-v-39f7f629="">
                            <a data-v-39f7f629="" href="shortrent.html" target="_self" class="colorRed">短租自驾</a>
                        </li>
                        <li data-v-39f7f629="">
                            <a data-v-39f7f629="" href="../pagehome/index.html" target="_self" >
                                <span data-v-39f7f629="">首页</span></a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
            </div>

    <div class="chooseCar">

            <div class="chooseCarL">
                <form action="" onsubmit="return false;">
                <div class="choose-get item">

                    <span class="itemTitle-red left">取&nbsp&nbsp车&nbsp&nbsp地&nbsp&nbsp址</span>
                    <div id="sel"  v-cloak>
                         <select id="dqsel"><!-- @change="getCity(cityId)" v-model="cityId"-->
                            <option>请选择</option>
                            <option v-for="mc in mcs" :value="mc.id">{{mc.name}}</option>
                        </select>

                        <select id="bmsel">
                            <option>请选择</option>
                            <option v-for="city in citys" :value="city.id">{{city.name}}</option>
                        </select>
                    </div>
                </div>
                <div class="choose-return item">
                    <span class="itemTitle-red left">还&nbsp&nbsp车&nbsp&nbsp地&nbsp&nbsp址</span>
                    <div id="seltwo"  v-cloak>
                        <select id="hcc" >
                            <option>请选择</option>
                            <option v-for="mc in mcs" :value="mc.id">{{mc.name}}</option>
                        </select>

                        <select id="hcs">
                            <option>请选择</option>
                            <option v-for="city in citys" :value="city.id">{{city.name}}</option>
                        </select>

                    </div>

                </div>
                </form>

            </div>
        <div class="chooseCarR">
            <button class="goChooseCar" onclick="selectCar()">去选车</button>
        </div>
    </div>
</div>
</body>
<script type="text/javascript">

    var vm = new Vue({
        el:'#dqsel',
        data:{
            mcs : [],
        },
    });

    var vm2 = new Vue({
        el:'#bmsel',
        data:{
            citys : [],
        },
    });


    $(function(){
        loadfirst(0);
    });

    function sub(id){
        loadfirst(id);
    }

    function loadfirst(pid){
        $.ajax({
            type:"post",
            url:"/carsys/city/select.do?pid="+pid,
            dataType:"json",
            success:function(data){
                //id为0时为父类
                if(pid==0){
                    vm.mcs=data.info;
                }else{
                    vm2.citys = data.info;
                }
            }
        });
    }
    $("#dqsel").change(function(){
        loadfirst($(this).children('option:selected').val());
    })


</script>

<script type="text/javascript">

    var vm3 = new Vue({
        el:'#hcc',
        data:{
            mcs : [],
        },
    });

    var vm4 = new Vue({
        el:'#hcs',
        data:{
            citys : [],
        },
    });



    $(function(){
        load(0);
    });

    function sub(id){
        load(id);
    }

    function load(pid){
        $.ajax({
            type:"post",
            url:"/carsys/city/select.do?pid="+pid,
            dataType:"json",
            success:function(data){
                //id为0时为父类
                if(pid==0){
                    vm3.mcs=data.info;
                }else{
                    vm4.citys=data.info;
                }
            }
        });
    }

    $("#hcc").change(function(){
        load($(this).children('option:selected').val());
    })

</script>

<script type="text/javascript">

    function selectCar() {
        var getid = $("#bmsel").val();
        var backid = $("#hcs").val();
        window.location.href="shortsort.html?getid="+getid+"&backid="+backid;

        }

</script>

<script type="text/javascript">
    var vm5 = new Vue({
        el:'#daohang',
        data:{
            denglu:'',
            weidenglu:''


        },
    });

    $(function () {
        $.ajax({
            type:"post",
            url:"/carsys/user/denglu.do",
            dataType:"json",
            success:function(data){
                //id为0时为父类
                if(data.code==1){
                    vm5.denglu=true;
                    vm5.weidenglu=false;
                }else{
                    vm5.denglu=false;
                    vm5.weidenglu=true;
                }
            }
        });
    })

</script>





</html>